package com.triadsystems.cashweb.modelo.persistencia.entidades;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

@Entity
@Table
@SequenceGenerator(name="seq_cupom_tef", sequenceName="cw_seq_cupom_tef", initialValue=1, allocationSize=1)
public class CupomTef extends ValueObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column
	@GeneratedValue(generator = "seq_cupom_tef", strategy = GenerationType.SEQUENCE)
	@Getter @Setter
	private Long entityId;
	
	@ManyToOne
	@Getter @Setter
	private FormaPagamento formaPagamento;
	
	@ManyToOne
	@Getter @Setter
	private Pagamento pagamento;
	
	@Getter @Setter
	private String cupomCliente;
	
	@Getter @Setter
	private String cupomEstabelecimento;
	
	@Getter @Setter
	private BigDecimal valor;
	
	@Getter @Setter
	private String indiceInstituicaoTransacao;
	
	@Getter @Setter
	private String indiceTipoCartao;
	
	@Getter @Setter
	private String nsuSitef;
	
	@Getter @Setter
	private String nsuHostAutorizador;
	
	@Getter @Setter
	private String codigoAutorizacaoCredito;
	
	@Getter @Setter
	private String numeroCartao;
	
	@Getter @Setter
	private String codigoEstabelecimento;
	
	@Getter @Setter
	private String codigoRedeAutorizadora;
	
	@Getter @Setter
	private String qtdParcela;

	@Override
	public String toString() {
		return "@@@" + cupomCliente
				+ cupomEstabelecimento + "\n";
	}
}
